<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS处理</title>
    <style>
        div{
            width:200px;
            height: 100px;
            background-color: red;
        }
        .c1{
            background-color: green;
        }
    </style>
    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <script>
        $(function(){
            $("#d1").mouseover(function(){
                // $(this).addClass("c1");
                $(this).css("background-color","blue")
            });
            $("#d1").mouseout(function(){
                // $(this).removeClass("c1");
                $(this).css("background-color","red")
            });
        })
    </script>
</head>
<body>
<div id="d1"></div>
</body>
</html>